home *** CD-ROM | disk | FTP | other *** search
- ############################################################
- #
- # Sendmail configuration file for "MAIN MACHINES"
- #
- # You should install this file as /etc/sendmail/sendmail.cf
- # if your machine is the main (or only) mail-relaying
- # machine in your domain. Then edit the file to
- # customize it for your network configuration.
- #
- # See the paper "Sendmail Installation and Administration Guide"
- # for more information on the format of this file.
- #
- # @(#)main.mc 1.0 88/10/26 NeXT; from SMI 3.2/4.3 NFSSRC
- #
-
- ### local info
-
-
- # my fully qualified hostname, $j, is now set by sendmail internally
- #Dj$?m$w.$m$|$w$.
- # if you want the gateway to assume the identity of its parent domain, use:
- #Dj$m
-
- # Major relay mailer - typical choice is "ddn" if you are on the
- # Defense Data Network (e.g. Arpanet or Milnet). All mail for
- # non-local domains will be forwarded to the major relay host using
- # the major relay mailer. We chose "uucp" as the default because most
- # isolated networks use it to link their network with the outside
- # world.
- #
- # If you want to use a relay mailer, examine ruleset 0. There are some
- # rules that need to be uncommented
- DMuucp
-
- # major relay host: use the $M mailer to send mail to other domains
- # To have mail automatically forwarded to other domains, you should
- # replace this with the name of your major relay host.
- DR mail-relay
- CR mail-relay
-
- # local UUCP connections - output from the uuname command
- FV|/usr/bin/uuname
-
- # options that you probably want on a mailhost:
-
- # checkpoint the queue after this many receipients
- OC10
-
- # refuse to send tiny messages to more than these recipients
- Ob10
-
- ############################################################
- #####
- ##### General configuration information
- #####
-
- # local domain name
- #
- # This is now set from the resolver configuration call. If the domain
- # name you would like to have appear in your mail headers is different
- # from your Internet domain name, edit and uncomment the following to
- # be your mail domain name.
- # DmPodunk.EDU
-
- # Version number of configuration file
- DVNX3.0M
-
-
- ### Standard macros
-
- # name used for error messages
- DnMailer-Agent
- # UNIX header format
- DlFrom $g $d
- # delimiter (operator) characters
- Do.:%@!^=/[]
- # format of a total name
- Dq$?x$x $.<$g>
- # SMTP login message
- De$j Sendmail $v/$V ready at $b
-
- ### Options
-
- # Remote mode - send through server if mailbox directory is mounted
- OR
- # location of alias file
- OA/etc/sendmail/aliases
- # default delivery mode (deliver in background)
- Odbackground
- # rebuild the alias file automagically
- OD
- # temporary file mode -- 0600 for secure mail, 0644 for permissive
- OF0600
- # default GID
- Og1
- # location of help file
- OH/usr/lib/sendmail.hf
- # log level
- OL9
- # default messages to old style
- Oo
- # To Cc postmaster on error replies I generate, uncomment the next line
- # OPPostmaster
- # queue directory
- OQ/usr/spool/mqueue
- # read timeout for SMTP protocols
- Or15m
- # status file -- none
- # OS/etc/sendmail/sendmail.st
- # queue up everything before starting transmission, for safety
- Os
- # return queued mail after this long
- OT3d
- # default UID
- Ou1
-
- ### Message precedences
- Pfirst-class=0
- Pspecial-delivery=100
- Pjunk=-100
-
- ### Trusted users
- Troot agent daemon uucp
-
- ### Format of headers
- H?P?Return-Path: <$g>
- HReceived: $?sfrom $s $.by $j ($v/$V)
- id $i; $b
- H?D?Resent-Date: $a
- H?D?Date: $a
- H?F?Resent-From: $q
- H?F?From: $q
- H?x?Full-Name: $x
- HSubject:
- H?M?Resent-Message-Id: <$t.$i@$j>
- H?M?Message-Id: <$t.$i@$j>
- HErrors-To:
-
- ###########################
- ### Rewriting rules ###
- ###########################
-
-
- # Sender Field Pre-rewriting
- S1
- # None needed.
-
- # Recipient Field Pre-rewriting
- S2
- # None needed.
-
- # Name Canonicalization
-
- # Internal format of names within the rewriting rules is:
- # anything<@host.domain.domain...>anything
- # We try to get every kind of name into this format, except for local
- # names, which have no host part. The reason for the "<>" stuff is
- # that the relevant host name could be on the front of the name (for
- # source routing), or on the back (normal form). We enclose the one that
- # we want to route on in the <>'s to make it easy to find.
- #
- S3
-
- # handle "from:<>" special case
- R<> $@@ turn into magic token
-
- # basic textual canonicalization
- R$*<$+>$* $2 basic RFC822 parsing
-
- # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
- R@$+,$+:$+ @$1:$2:$3 change all "," to ":"
- R@$+:$+ $@$>6<@$1>:$2 src route canonical
-
- R$+:$*;@$+ $@$1:$2;@$3 list syntax
- R$+@$+ $:$1<@$2> focus on domain
- R$+<$+@$+> $1$2<@$3> move gaze right
- R$+<@$+> $@$>6$1<@$2> already canonical
-
- # convert old-style names to domain-based names
- # All old-style names parse from left to right, without precedence.
- R$-!$+ $@$>6$2<@$1.uucp> uucphost!user
- R$-.$+!$+ $@$>6$3<@$1.$2> host.domain!user
- R$+%$+ $:$1%%$2 user%host
- R$+%%$+%$+ $1%$2%%$3 move gaze right
- R$+%%$+ $@$>3$1@$2 re-canonicalize
-
- # Final Output Post-rewriting
- S4
- R$+<@$+.uucp> $2!$1 u@h.uucp => h!u
- R$+ $: $>9 $1 Clean up addr
- R$*<$+>$* $1$2$3 defocus
-
-
- # Clean up an name for passing to a mailer
- # (but leave it focused)
- S9
- R@ $@$n handle <> error addr
- R$*<$*LOCAL>$* $1<$2$m>$3 change local info
- R<@$+>$*:$+:$+ <@$1>$2,$3:$4 <route-addr> canonical
-
-
- #############################################################
- #####
- ##### Rewriting rules
- #####
-
- # special local conversions
- S6
- R$*<@$*.uucp>$* $@$1<@$2.uucp>$3 no change to UUCP hosts
- R$*<@$+>$* $:$1<@$[$2$]>$3 find canonical hostname
- R$*<@$*$=m>$* $1<@$2LOCAL>$4 convert local domain
-
- ############################################################
- #####
- ##### Local and Program Mailer specification
- #####
- Mlocal, P=/bin/mail, F=rlsDFMnuP, S=10, R=20, A=mail -d $u
- Mprog, P=/bin/sh, F=lsDFMeuP, S=10, R=20, A=sh -c $u
-
- S10
- # None needed.
-
- S20
- # None needed.
-
- ############################################################
- #####
- ##### Ethernet Mailer specification
- #####
- ##### Messages processed by this configuration are assumed to remain
- ##### in the same domain. This really has nothing particular to do
- ##### with Ethernet - the name is historical.
-
- Mether, P=[TCP], F=mDFMuX, S=11, R=21, A=TCP $h
- S11
- R$*<@$+>$* $@$1<@$2>$3 already ok
- R$+ $@$1<@$w> tack on our hostname
-
- S21
- # None needed.
-
-
-
- ############################################################
- #####
- ##### General code to convert back to old style UUCP names
- #####
- S5
- R$+<@LOCAL> $@ $w!$1 name@LOCAL => host!name
- R$+<@$-.LOCAL> $@ $2!$1 u@h.LOCAL => h!u
- R$+<@$+.uucp> $@ $2!$1 u@h.uucp => h!u
- R$+<@$*> $@ $2!$1 u@h => h!u
- # Route-addrs do not work here. Punt til uucp-mail comes up with something.
- R<@$+>$* $@ @$1$2 just defocus and punt
- R$*<$*>$* $@ $1$2$3 Defocus strange stuff
-
- ############################################################
- #####
- ##### UUCP Mailer specification
- #####
- Muucp, P=/usr/bin/uux, F=mDFMhuU, S=13, R=23, E=\n,
- A=uux - -r $h!rmail ($u)
-
- # Convert uucp sender (From) field
- S13
- R$+ $:$>5$1 convert to old style
- R$=w!$+ $2 strip local name
- R$+ $:$w!$1 stick on real host name
-
- # Convert uucp recipient (To, Cc) fields
- S23
- R$+ $:$>5$1 convert to old style
-
-
- ############################################################
- #####
- ##### DDN Mailer specification
- #####
- ##### Send mail on the Defense Data Network
- ##### (such as Arpanet or Milnet)
-
- Mddn, P=[TCP], F=mDFMuCX, S=22, R=22, A=TCP $h, E=\r\n
-
- # map containing the inverse of mail.aliases
- DZmail.byaddr
-
- S22
- R$*<@LOCAL>$* $:$1
- R$-<@$-> $:$>3${Z$1@$2$} invert aliases
- R$*<@$+.$*>$* $@$1<@$2.$3>$4 already ok
- R$+<@$+>$* $@$1<@$2.$m>$3 tack on our domain
- R$+ $@$1<@$j> tack on our hostname
-
-
- ############################################################
- #
- # RULESET ZERO
- #
- # This is the ruleset that determines which mailer a name goes to.
-
- # Ruleset 30 just calls rulesets 3 then 0.
- S30
- R$* $: $>3 $1 First canonicalize
- R$* $@ $>0 $1 Then rerun ruleset 0
-
- S0
- # On entry, the address has been canonicalized and focused by ruleset 3.
- # Handle special cases.....
- R@ $#local $:$n handle <> form
- # For numeric spec, you can't pass spec on to receiver, since rcvr's
- # are not smart enough to know that [x.y.z.a] is their own name.
- R<@[$+]>:$* $:$>9 <@[$1]>:$2 Clean it up, then...
- R<@[$+]>:$* $#ether $@[$1] $:$2 numeric internet spec
- R<@[$+]>,$* $#ether $@[$1] $:$2 numeric internet spec
- R$*<@[$+]> $#ether $@[$2] $:$1 numeric internet spec
-
- # resolve the local hostname to "LOCAL".
- R$*<$*$=w.LOCAL>$* $1<$2LOCAL>$4 thishost.LOCAL
- R$*<$*$=w.uucp>$* $1<$2LOCAL>$4 thishost.uucp
- R$*<$*$=w>$* $1<$2LOCAL>$4 thishost
-
- # Mail addressed explicitly to the domain gateway (us)
- R$*<@LOCAL> $@$>30$1 strip our name, retry
- R<@LOCAL>:$+ $@$>30$1 retry after route strip
-
- # deliver to known ethernet hosts explicitly specified in our domain
- R$*<@$+.LOCAL>$* $#ether $@$2 $:$1<@$2>$3 user@host.ourdomain
- # hosts in no domains are assumed to be local
- R$*<@$->$* $#ether $@$2 $:$1<@$2>$3 user@host
-
- # Clean up addresses for external use -- kills LOCAL, route-addr ,=>:
- R$* $:$>9 $1 Then continue...
-
- # resolve UUCP domain
- R<@$=V.uucp>:$+ $#uucp $@$1 $:$2 @host.uucp:...
- R$+<@$=V.uucp> $#uucp $@$2 $:$1 user@host.uucp
- R<@$-.uucp>:$+ $#error $:Never heard of UUCP host $1
- R$+<@$-.uucp> $#error $:Never heard of UUCP host $2
-
- # If you want to pass all other explicit domain names up the ladder
- # to our forwarder then uncomment the following line.
- #R$*<@$*.$+>$* $#$M $@$R $:$1<@$2.$3>$4 user@any.domain
- # and comment out this one.
- R$*<@$+.$->$* $#ddn $@ $2.$3 $:$1<@$2.$3>$4 user@any.domain
-
- # All addresses in the rules ABOVE are absolute (fully qualified domains).
- # Addresses BELOW can be partially qualified.
-
- R$*@$* $#error $:I don't understand $1@$2
-
- # Local names with % are really not local!
- R$+%$+ $@$>30$1%$2 retry
-
- # everything else is a local name
- R$+ $#local $:$1 local names
-